package com.lmm.handler;

import com.lmm.beans.User;
import com.lmm.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserHandler {
    @Autowired
    IUserService userService;
    @RequestMapping("/register")
    public String register(User user){
    System.out.println(user);
    userService.addUser(user);
    return "/WEB-INF/welcome.jsp";
    }
}
